package com.ds.lens.data.common.query.es;

public class InTermsFunction implements TranslateFunction {
    public static final String NAME = "in_terms";

    @Override
    public void apply(Appendable appender, String... input) throws Exception {
        appender.append(input[0])
                .append("=")
                .append(NAME)
                .append("(");
        for (int i = 1; i < input.length; i++) {
            appender.append(input[i]);
            if (i != input.length - 1) {
                appender.append(",");
            }
        }
        appender.append(")");
    }
}
